package cn.itcast.dewu.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName tb_blog_comments
 */
@TableName(value ="tb_blog_comments")
@Data
@Accessors(chain = true)
public class BlogComments implements Serializable {
    /**
     * 主键
     */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)

    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)

    private Long userId;

    /**
     * 博客id
     */
    @JsonSerialize(using = ToStringSerializer.class)

    private Long blogId;

    /**
     * 关联的1级评论id，如果是一级评论，则值为0
     */
    @JsonSerialize(using = ToStringSerializer.class)

    private Long parentId;

    /**
     * 回复的评论id
     */
    @JsonSerialize(using = ToStringSerializer.class)

    private Long answerId;

    /**
     * 回复的内容
     */
    private String content;

    /**
     * 点赞数
     */
    private Integer liked;

    /**
     * 状态，0：正常，1：被举报，2：禁止查看
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    /**
     * 是否点赞过了
     */
    @TableField(exist = false)
    private Boolean isLike;
    /*
     * 用户头像
     * */
    @TableField(exist = false)
    private String nickName;
    @TableField(exist = false)
    private String icon;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}